/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Console;

import java.text.DateFormat;
import java.util.Date;

/**
 *
 * @author Kenneth Veenstra
 */
public class Publisher
{
    private static final Publisher instance = new Publisher();
    private FileReadWriter frw;

    private Publisher()
    {
        frw = new FileReadWriter();
    }

    public static Publisher getInstance()
    {
        return instance;
    }

    public void log(String line)
    {
        String date = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(new Date());
        frw.writeFile("[" + date + "] " + line, "C:/Maffiagame/log.txt", true);
    }
}
